
const app = getApp();
const db = wx.cloud.database()
const store = db.collection('map_maps');
Page({


  data: {

  },


  onLoad: function (options) {
    
    store
    .where({
      id:Number(options.id)
    })
    .get()
    .then(res => {
      console.log(res.data[0])
      this.setData({
        spot:res.data[0]
      })
      
    })

   


  },
  opendLocation(){

    var that = this;
    wx.openLocation({
      latitude: Number(that.data.spot.latitude),
      longitude: Number(that.data.spot.longitude),
    })
  },
})